package com.phiture.erp.purchase.core.pojo.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Schema(description = "管理后台 - 采购申请单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ErpPurchaseRequestRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "897")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "采购申请单编号")
    @ExcelProperty("采购申请单编号")
    private String no;

    @Schema(description = "业务日期")
    @ExcelProperty("业务日期")
    private LocalDateTime bizDate;

    @Schema(description = "金额合计(不含税)")
    @ExcelProperty("金额合计(不含税)")
    private BigDecimal totalAmount;

    @Schema(description = "申请人", example = "729")
    @ExcelProperty("申请人")
    private Long personId;

    @Schema(description = "申请人姓名", example = "729")
    @ExcelProperty("申请人姓名")
    private String personName;

    @Schema(description = "是否加急")
    @ExcelProperty("是否加急")
    private Integer isUrgent;

    @Schema(description = "申请部门", example = "20190")
    @ExcelProperty("申请部门")
    private Long deptId;

    @Schema(description = "申请部门", example = "20190")
    @ExcelProperty("申请部门")
    private String deptName;

    @Schema(description = "需求类型", example = "22746")
    @ExcelProperty("需求类型")
    private Integer demandType;

    @Schema(description = "税额合计")
    @ExcelProperty("税额合计")
    private BigDecimal totalTax;

    @Schema(description = "价税合计")
    @ExcelProperty("价税合计")
    private BigDecimal totalTaxAmount;

    @Schema(description = "状态", example = "1")
    @ExcelProperty("状态")
    private Integer status;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    //===================申请明细信息========================

    /***
     * 申请单明细ID
     */
    private Long itemId;

    /**
     * 物料ID
     */
    private Long materialId;

    @Schema(description = "物料编号")
    @ExcelProperty("物料编号")
    private String materialNo;

    @Schema(description = "物料名称")
    @ExcelProperty("物料名称")
    private String materialName;

    /**
     * 单位
     */
    private Long unitId;

    private String unitName;
    /**
     * 数量
     */
    private BigDecimal qty;
    /**
     * 单价(不含税)
     */
    private BigDecimal price;
    /**
     * 税率
     */
    private Double tax;
    /**
     * 币种
     */
    private Integer currency;
    /**
     * 金额合计
     */
    private BigDecimal amount;
    /**
     * 价税合计
     */
    private BigDecimal taxAmount;

    /**
     * 需求日期
     */
    private Date requireDate;
    /**
     * 建议采购日期
     */
    private Date advicePurchaseDate;
    /**
     * 主计划ID
     */
    private Long planId;
    /**
     * 销售订单ID
     */
    private Long saleOrderId;
    /**
     * 销售订单明细ID
     */
    private Long saleOrderItemId;
    /**
     * 已采购数量
     */
    private BigDecimal purchaseOrderQty;
    /**
     * 备注
     */
    private String remark;

}